package com.ruoyi.equip.vert.domain;

import lombok.Data;

@Data
public class TcpAnsEntity {
    private String prefix="BD";
    private String readerId;

    private String optType;



    private String paramLen;

    private String param;

    private String crc;

    private String tail="0D0A";

    @Override
    public String toString() {
        return  prefix+readerId+optType+paramLen+param+crc;
    }



    public void setParam(String param) {
        this.param = param;
        this.paramLen=String.format("%02X", param.length()/2 & 0xFFFF);
    }
}
